<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?php echo C('SITE_INFO.name');?></title>
<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
<link href="__PUBLIC__/Catalog/css/common.css" rel="stylesheet" type="text/css" />

<link href="__PUBLIC__/Catalog/css/myFabu.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>" id="back"> < </a>我的发布
         </div>
   </div>
   <div class="products">
       <?php if(is_array($productsList)): foreach($productsList as $key=>$vo): ?><div class="products_list">
	           <table>
	                <tr bordercolor="#FF0000">
	                    <td style="width:80px; height:70px;"><a href="<?php echo U('Mproducts/detail');?>?uid=<?php echo ($uid); ?>&pid=<?php echo ($vo["products_id"]); ?>"><img src="__PUBLIC__/images/products/thumb/s_<?php echo ($vo["products_image"]); ?>" /></a></td>
	                    <td style="width:190px; height:70px; padding-left: 5px;">
	                        <dl class="dls">
	                           <dt><a href="<?php echo U('Mproducts/detail');?>?uid=<?php echo ($uid); ?>&pid=<?php echo ($vo["products_id"]); ?>" style="font-size:18px; color:#000;"><?php echo ($vo["products_name"]); ?></a></dt>
	                           <dd>
	                               <span class="phone"><?php if(is_array($$vo['cate'])): foreach($$vo['cate'] as $key=>$vo1): echo ($vo1["categories_name"]); endforeach; endif; ?></span>
	                               <span class="phone"><?php if($vo["up_flag"] == 1): ?>已置顶<?php endif; ?></span>
	                               <span class="phone"><?php if($vo["jiaji_flag"] == 1): ?>已加急<?php endif; ?></span>
	                           </dd>
	                           <dd><?php if($vo["show_flag"] == 1): ?><span class="what">已卖出</span><?php else: if($vo["products_status"] == 1): ?><span class="what">已发布</span><?php else: ?><span class="what" style="color:red">未发布</span><?php endif; ?><span class="time"><?php echo (date('Y-m-d',$vo['products_date_added'] )); ?></span><?php endif; ?></dd>
	                        </dl>
	                    </td>
	                    <td style="width:70px; height:70px;">
	                           <p class="cc">
	                               <?php if($vo["show_flag"] == 0): ?><a href="javascript:closeProduct('<?php echo ($vo["products_id"]); ?>');" class="ji">关闭</a><?php endif; ?>
	                           </p>
	                    </td>
	                </tr>
	           </table>
	       </div><?php endforeach; endif; ?>
       
   </div>
   <div class="products" style="text-align:center;margin-top:10px;"><a style="display:block;width:200px;height:40px;line-height:40px;margin:auto;text-align:center;background:#ccc;" href="<?php echo U('Mproducts/publish');?>?uid=<?php echo ($uid); ?>">发布商品</a></div>
</div>
<div class="foot" style="display:none;" id="foot">
    <div class="foot2">
        <span class="foot2i">请选择操作</span>
        <a class="foot2x" onclick="javascript:$('#foot').css('display','none');" ></a>
    </div>
    <div class="foot2Select">
        <span class="go" onclick="javascript:window.location.href='<?php echo U("Mproducts/publish");?>?uid=<?php echo ($uid); ?>'">继续发布</span>
        <span class="del" style="display:none;">删除发布</span>
    </div>
</div>
<div class="foot" style="display:none;" id="closereason">
    <div class="foot2">
        <span class="foot2i">请选择操作</span>
        <a class="foot2x" onclick="javascript:$('#closereason').css('display','none');" ></a>
    </div>
    <div class="foot2Select">
        <a class="go" id="havenshow" href=="">已经卖出</a>
        <a class="del" id="noshow"  href="">不想卖了</a>
    </div>
</div>
<script>
    $(function(){
        if('<?php echo ($msg); ?>'!='0'){
            alert('<?php echo ($msg); ?>');
        }
    });
    //关闭愿意
    function closeProduct(pid){
    	var href='<?php echo U("Mproducts/delete");?>?uid=<?php echo ($uid); ?>&pid='+pid;
    	$('#havenshow').attr('href',href+'&reason=1'); 
    	$('#havenshow').attr('href',href+'&reason=2'); 
    	$('#closereason').css('display','block');
    }
</script>
<div class="index-foot">
    <div class="index-foot2">
            <ul>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Index/index');?>"><img src="__PUBLIC__/Catalog/images/house.png" /></a></dd>
                      <dd><a href="<?php echo U('Index/index');?>">首页</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Products/index');?>"><img src="__PUBLIC__/Catalog/images/cate1.png" /></a></dd>
                      <dd><a href="<?php echo U('Products/index');?>">商品</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd><a href="<?php echo U('Mproducts/publish');?>"><img src="__PUBLIC__/Catalog/images/jia.png"style=" width:50px; height:50px;" /></a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/leaveword');?>"><img src="__PUBLIC__/Catalog/images/<?php if($count > 0): ?>message-hot.png<?php else: ?>message.png<?php endif; ?>" /></a></dd>
                      <dd><a href="<?php echo U('Membership/leaveword');?>">信息</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>"><img src="__PUBLIC__/Catalog/images/men.png" /></a></dd>
                      <dd><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>">我的</a></dd>
                  </dl>
              </li>
            </ul>       
    </div>
</div>
</body>
</html>